package com.springboot.frame;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author liheng
 * @ClassName DiscoveryApplication
 * @Description
 * @date 2021-03-23 14:49
 */
@SpringBootApplication
public class DiscoveryApplication {
    public static void main(String[] args) {
        SpringApplication.run(DiscoveryApplication.class, args);
    }

    @RestController
    class IndexController {
        @GetMapping("/echo")
        public String getDemo() {
            return ">>>>>>>>>>>>>>>>>>>>>>>>>>>>";
        }
    }

       /* @Bean
    @LoadBalanced
    public RestTemplate loadBalanceRestTemplate() {
        HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory();
        // 设置超时
        requestFactory.setConnectTimeout(60 * 1000);
        requestFactory.setReadTimeout(60 * 1000);
        requestFactory.setConnectionRequestTimeout(10000);
        RestTemplate restTemplate = new RestTemplate(requestFactory);
        return restTemplate;
    }*/
}
